import com.google.appengine.api.datastore.Entity
import com.google.appengine.api.datastore.Key

def appConfigId = params.appConfigKey as int
def appConfigKey = [
	'AppConfigE',
	appConfigId] as Key
Entity appconfig = datastore.get(appConfigKey)
if(appconfig != null) {
	Date now = new Date()
	appconfig.value = params.value
	appconfig.updatedTime = now
	appconfig.save()
	application["appconfig.$appconfig.id"] = appconfig.value
}

request.infoMessage =  params.id + ' ' + params.action.toLowerCase() + 'd...'

forward 'appconfig.groovy?'